﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Site.Domain.Core.Abstract;

namespace Site.Domain.Core.Concrete
{
    public class Block : IBlock
    {
        private const int DEFAULT_SIZE = 100;
        private const int DEFAULT_POSITION = 50;

        internal Block()
        {
            Color = Color.Green;
            Size = new Size { Width = DEFAULT_SIZE, Height = DEFAULT_SIZE };
            Position = new Position { X = DEFAULT_POSITION, Y = DEFAULT_POSITION };
        }

        public string Name { get; set; }

        public string Title { get; set; }

        public Color Color { get; set; }

        public Size Size { get; set; }

        public Position Position { get; set; }


        public Margin Margin { get; set; }

        public override string ToString()
        {
            return String.Format("X:{0} Y:{1} W:{2} H:{3}",Position.X, Position.Y, Size.Width, Size.Height);
        }
    }
}
